<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东三角练习</title>
    <style>
        .box{
            position: relative;
            width: 300px;
            height: 150px;
            background-color: pink;
            margin: 100px auto;
        }

        .right{
            position:absolute;
            right: -9px;
            /* 垂直居中 */
            top: 50%;
            /* 三角盒子(10px)的一半 */
            margin-top: -5px;
            width: 0;
            height: 0;
            /* 解决兼容性 */
            line-height: 0;
            font-size: 0;
            border:5px solid transparent;
            border-left-color:pink;
        }
    </style>
</head>
<body>
    <div class="box">
        <span class="right"></span>
    </div>
</body>
</html>